Item Property (Folders Collection)
The Item
property returns a single Folder
Syntax
objFoldersColl.Item(index)
objFoldersColl.Item(prefix)
index
A long
integer ranging from 1 to the size of the Folders collection.
prefix
A string
representing a prefix substring of a Folder object s Name
Data Type
Object
Remarks
The Item
property is useful for satisfying syntax requirements when obtaining a member
of a Folders collection.
A large
collection cannot support true integer indexing, and the Item(index)
syntax cannot be used for arbitrary selection of members of the collection.
Programmers needing to access individual objects in a large collection are
strongly advised to use the Visual Basic For Each statement or the Get
methods, particularly GetFirst
The Item(index)
syntax is provided solely as a placeholder in an indexed loop, such as the For
... Next construction in Visual Basic. Such a loop must proceed forward
from the beginning of the collection, and the index must have initial and
increment values of 1. Results are undefined for any other procedure.
For more
information on using the Count and Item properties in a large
collection, see the example in the Count
The Item(prefix)
syntax returns the first Folder object whose Name
The Item
property is the default property of a Folders collection, meaning that Folders(prefix)
is syntactically equivalent to Folders.Item(prefix) in Visual Basic
code.